<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/Home.css" />
<?php
    $conn = mysql_connect("localhost", "root","123456") or die("Ket noi den MySQL that bai");
    mysql_select_db("mp3", $conn);
    mysql_query("SET NAMES UTF8",$conn);
        $id=$_REQUEST["id"];
      $sql="select * from `music_nghesi` 
                inner join `nghesi` on `nghesi`.`id_nghesi`=`music_nghesi`.`id_nghesi` 
                inner join `music` on `music`.`id_music` = `music_nghesi`.`id_music`
                where `music_nghesi`.`id_nghesi`= ".$id ;
                 $q = mysql_query($sql);
    $row = mysql_fetch_array($q);

    $tennghesi=$row["nghedanh"];
    $pic2=$row["pic2"];
    $pic1=$row["pic1"];

?>
<title><?= $tennghesi?></title>
<link rel="stylesheet" type="text/css" href="engine1/style.css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<meta name="keywords" content="WOW Slider, Wordpress Gallery Slider, Wordpress Photo Slider" />
<meta name="description" content="WOWSlider created with WOW Slider, a free wizard program that helps you easily generate beautiful web slideshow" />
<script language="javascript" type="text/javascript" src="engine1/jquery.js"></script>

</head>
<?php include_once('master_menu.php');?>

<div class="page">
<h1><?= $tennghesi?></h1>
<div class="singerbig">
 <?php
                 $sql="select * from `nghesi` where `id_nghesi`= ".$id;
                 $q = mysql_query($sql);
                 while ($row= mysql_fetch_array($q))
                {
                    $pic2=$row["pic2"];
                    $pic1=$row["pic1"];
                    $tenthat=$row["tenthat"];
                    $ngaysinh=$row["ngaysinh"];
                    $quoctich=$row["quoctich"];
            ?>
<img style="padding-bottom:10px" src="<?=$pic2?>" width="1080px" height="215px" />
<?php
}
?>

<div class="menuvideo">
      <ul class="menu2">
        <li class="select"><span>TẤT CẢ</span> </li>
        <li> <a href="artist_page_tieusu.php?id=<?=$id?>">TIỂU SỬ</a> </li>
        <li> <a href="artist_page_baihat.php?id=<?=$id?>">BÀI HÁT</a> </li>
        <li> <a href="artist_page_album.php?id=<?=$id?>">ALBUM</a> </li>
        <li> <a href="artist_page_video.php?id=<?=$id?>">VIDEO</a> </li>
      </ul>
    </div>

</div>
<div class="cont-singer">
<div class="contsinger">
	<div class="song-list">
  <h2>Bài Hát</h2>
    <span>
    &nbsp; /
    <a href="#">tất cả</a></span>
    <ul>
    <?php
      
      $sql2=mysql_query("select * from `music_nghesi` 
                inner join `nghesi` on `nghesi`.`id_nghesi`=`music_nghesi`.`id_nghesi` 
                inner join `music` on `music`.`id_music` = `music_nghesi`.`id_music`
                where `music_nghesi`.`id_nghesi`=" .$id );
    
    $itemcount=1;
    while( $row= mysql_fetch_array($sql2))
    
    {
        $tenbh = $row["tenmusic"];
         $baihat=$row["id_music"];
        $id=$row["id_nghesi"];
    ?>
    <li>
    	<div>
        
        <span><?=$itemcount?></span>
      	<h3><a href="chitietbh.php?id=<?=$baihat?>&idcs=<?=$id?>"> &emsp;  &emsp; <?=$tenbh?></a></h3>
        
        </div>
        <div class="icon-artist">
        <a href="#">
        <img width="24" height="24" src="images/round_down_arrow.png" />
        </a>
        <a href="#">
        <img width="24" height="24" src="images/round_add.png" />
        </a>
        </div>
    </li>
    <?php
    $itemcount++;
    }
    ?>
    </ul>
    </div>
</div>
<div class="contsinger">
	<div class="song-list">
    <h2>Album</h2>
    <span>
    &nbsp; /
    <a href="#">tất cả</a>
    </span>
    </div>
         <?php
      
      $sql2=mysql_query("select * from `album_nghesi` 
                inner join `nghesi` on `nghesi`.`id_nghesi`=`album_nghesi`.`id_nghesi` 
                inner join `album` on `album`.`id_album` = `album_nghesi`.`id_album`
                where `album_nghesi`.`id_nghesi`=".$id );
    
    
    while( $row= mysql_fetch_array($sql2))
    
    {
        $tenab = $row["tenalbum"];
        $idab = $row["id_album"];
        $id=$row["id_nghesi"];
        $tencs=$row["nghedanh"];
    ?>
    <div class="singer-album"> <a href="#"><img style="width: 165px;" src="<?=$pic1?>"></a>
            <div class="metaalbum"> <a id="a1" href="#"><?=$tenab?></a><br>
              <a id="a2" href="artist_page.php?id=<?=$id?>"><?=$tencs?></a></div>
          </div>
          <?php
          }
          ?>
 

    </div>
    



<div class="contsinger">
	<div class="song-list">
    <h2>Album</h2>
    <span>
    &nbsp; /
    <a href="#">tất cả</a>
    </span>
    </div>   
    <?php
      
      $result =   mysql_query("select * from `music_nghesi` 
                inner join `nghesi` on `nghesi`.`id_nghesi`=`music_nghesi`.`id_nghesi` 
                inner join `music` on `music`.`id_music` = `music_nghesi`.`id_music`
                where `music_nghesi`.`id_nghesi`=".$id." and loai=1");
    
    while($row = mysql_fetch_array($result))
    
    {
        $tenbh = $row["tenmusic"];
        $id=$row["id_nghesi"];
        $pic=$row["pic"];
        $baihat=$row["id_music"];
  ?> 
   
    <div class="singer-video">
     <a href="chitietvideo.php?id=<?=$baihat?>&idcs=<?=$id?>">
     <img src="<?=$pic?>">
     </a>
     <span>
     	<a href="chitietvideo.php?id=<?=$baihat?>&idcs=<?=$id?>">
        <?=$tenbh?>
        </a>
     </span>
           
    </div>
    <?php
    }
?>
    
   
    
   

</div>


</div>
<div class="inforsinger">
<div class="singersmall"><img src="<?=$pic1?>" width="270" height="270" /></div>
<div class="inforsinger">
         <p>
    	<span>Tên Ca Sĩ:</span>
        <?=$tenthat?>
    </p>
    <p>
    	<span>Ngày sinh: </span>
        <?=$ngaysinh?>
    </p>
    <p>
    	<span>Quốc Gia: </span>
      <?=$quoctich?>
    </p>
    <p>
    	<span><a href="artist_page_tieusu.php?id=<?=$id?>">Xem toàn bộ</a></span>
    </p>
  <?php
    mysql_close($conn);
?>  
</div>
</div>
</div>

<?php include_once('master_footer.php');?>